import request from '@/utils/request'

/**
 * @description: 获取下拉员工数据
 * @param {*}
 * @return {*}
 */
export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple',
    method: 'get'

  })
}
// 获取员工详细数据
export function getEmployeeList(params) {
  return request({
    methods: 'get',
    url: '/sys/user',
    params
  })
}
// 删除员工数据
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: '/sys/user/' + id
  })
}
// 新增员工
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
/**
 * @description: 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function saveUserDetailById(data) {
  return request({
    url: '/sys/user/' + data.id,
    method: 'put', // 全量修改
    data
  })
}
